summaryrefslogtreecommitdiff
path: root/src/pages/[locale]/index.astro
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-12 17:22:33 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-12 17:22:33 +0100
commite0c5ec43f5c2a105dc3c626d7c4bc74b512662f4 (patch)
tree4eabdb4b96e960e83f38b5af3b8407d58beb0220 /src/pages/[locale]/index.astro
parentb99397f884e41a1018a217c6eb116ed00f922a4f (diff)
Parameterises translation
Diffstat (limited to 'src/pages/[locale]/index.astro')
-rw-r--r--src/pages/[locale]/index.astro8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro
index 5f9ab7a..8ae3a7b 100644
--- a/src/pages/[locale]/index.astro
+++ b/src/pages/[locale]/index.astro
@@ -6,15 +6,17 @@ import site from '../../i18n/translations/site';
import home from '../../i18n/translations/pages/home';
import type Locale from '../../types/Locale';
-export async function getStaticPaths() { return localeStaticPaths; }
+export async function getStaticPaths() {
+ return localeStaticPaths;
+}
const locale = Astro.params.locale as Locale;
const t = translate(locale);
---
-<Page locale={locale} title={ t(home, 'title') }>
+<Page locale={locale} title={t(home, { key: 'title' })}>
<section>
- <h1 class="title">{ t(site, 'title') }</h1>
+ <h1 class="title">{t(site, { key: 'title' })}</h1>
<h1>Tap-level heidin</h1>
<h2>Seicont-level heidin</h2>
<h3>Third-level heidin</h3>